﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace 第二课堂评审系统.Models
{
    public class AchievementConfig : IEntityTypeConfiguration<Achievement>
    {
        public void Configure(EntityTypeBuilder<Achievement> builder)
        {
            builder.ToTable("T_Achievement");
            builder.HasOne(a => a.Judge).WithMany(s=>s.achievements);
            builder.HasOne(a => a.Partnar).WithMany(s=>s.achievements);
        }
    }
}
